import java.util.Arrays;
public class Text {
    public static boolean conNum(int[] array) {
        int count=0;
        for (int i = 0; i < array.length; i++) {
            if(array[i]%2!=0){
                count++;
            }else{
                count=0;
            }
            if(count==3){
                return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[] array={2,5,3,6,7,9};
        System.out.println(conNum(array));
    }
    public static int findMoreNum(int[] array) {
        int num=array[0];
        int count=1;
        for (int i = 1; i < array.length; i++) {
            if(array[i]==num){
                count++;
            }else{
                count--;
            }
            if(count==0){
                count++;
                num=array[i];
            }
        }
        return num;
    }
    public static void main5(String[] args) {
        int[] array={2,2,1,1,2,1,1,3};
        System.out.println(findMoreNum(array));
    }
    public static int findNum(int[] array) {
        int ret=array[0];
        for (int i = 1; i < array.length; i++) {
            ret^=array[i];
        }
        return ret;
    }
    public static void main4(String[] args) {
        int[] array={1,2,3,4,3,2,1};
        System.out.println(findNum(array));
    }
    public static int[] FindSum(int[] nums, int target) {
        for (int i = 0; i < nums.length; i++) {
            for (int j = i+1; j < nums.length; j++) {
                if (nums[i]+nums[j]==target) {
                    return new int[]{i,j};
                }
            }
        }
        return new int[]{-1,-2};
    }
    public static void main3(String[] args) {
        int[] nums={1,5,9,10,12};
        int[] ret=FindSum(nums,22);
        System.out.println(Arrays.toString(ret));
    }
    public static void BubbleSort(int[] array) {
        for (int i = 0; i < array.length; i++) {
            int flg=1;
            for (int j = 0; j < array.length-1-i; j++) {
                if(array[j]>array[j+1]) {
                    flg=-1;
                    int tmp=array[j];
                    array[j]=array[j+1];
                    array[j+1]=tmp;
                }
            }
            if(flg==1){
                return;
            }
        }
    }
    public static void main2(String[] args) {
        int[] array={9,8,7,6,5,4,3,2,1};
        BubbleSort(array);
        System.out.println(Arrays.toString(array));
    }
    public static int BinarySearch(int[] array,int val) {
        int left=0;
        int right=array.length-1;
        while(left<=right){
            int mid=(left+right)/2;
            if(array[mid]>val){
                right=mid-1;
            }else if(array[mid]<val) {
                left = mid + 1;
            }else{
                return mid;
            }
        }
        return -1;
    }
    public static void main1(String[] args) {
        int[] array={1,2,3,4,5,6,7,8,9,10};
        System.out.println(BinarySearch(array, 19));;
    }
}
